<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Java EE 6 Examples</title>
    </h:head>
    <h:body>
        <h:form>
            <h:messages globalOnly="true" />

            <h1>Edit Employee</h1>
            <h:panelGrid columns="3">
                <h:outputLabel for="id" value="Id:" />
                <h:outputText id="id"
                   value="#{editBean.employee.id}" />
                <h:outputText value="" />

                <h:outputLabel for="name" value="Name:" />
                <h:inputText id="name"
                   value="#{editBean.employee.name}" >
                    <f:validateBean />
                </h:inputText>
                <h:message for="name" style="color: red;" />
            </h:panelGrid>
            <br />
            <h:commandButton value="Save"
               action="#{editBean.save}" />
            <h:commandButton value="Save and close"
               action="#{editBean.saveAndClose}" />
            <h:commandButton value="Cancel"
               action="/index.xhtml" />
        </h:form>
    </h:body>
</html>

